/*struct-varray.c*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

struct string {
  int length;
  char s[1];
};

int main(void)
{
  char str0[] = "Hello, world.";
 /*  char str1[] = "follow your gut."; */
  struct string *v0 = (struct string*)malloc(sizeof(struct string)+strlen(str0));
 

  if(v0!=NULL) {
    strcpy(v0->s,str0);
    printf("string 0:%s\n",v0->s);
    printf("%p,%p\n",v0,v0->s);
    free(v0);
  }

  return 0;
}
 
